#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
typedef int BTNode
int TreeSize(BTNode* root)
{
	
	if (root == NULL)
	{
		return 0;
	}

	if ((root->left == NULL && root->right != NULL)
		|| (root->left != NULL && root->right == NULL))
		return 1;

	return TreeSize(root->left) + TreeSize(root->right);
}

int TreeHeight(BTNode* root)
{
	if (root == NULL)
		return 0;
	int left_size = TreeHeight(root->left);
	int right_size = TreeHeight(root->right);

	return left_size > right_size ? left_size + 1 : right_size + 1;

}